For example, in the event of abnormality in a vehicle, an electronic control unit (hereinafter referred to as ECU) stores a diagnosis code corresponding to the abnormal state in a memory. In general, when an ECU stores a diagnosis code in a memory, the ECU stores the time of occurrence of abnormality together with the diagnosis code. This aims at maximally facilitating the identification of the cause of the abnormality.
When the time of occurrence of the abnormality has been recorded in the memory, it is easier to find out the situation at the occurrence time of the abnormality, the action taken by the user on a product of concern, and the like. However, to provide the ECU with such a time keeping function, it is necessary to embed a dedicated clock circuit in the ECU.
To solve above-described problem, a technical idea has been provided which cumulatively adds up the periods during which power is supplied from a vehicle-mounted battery as a result of closing the ignition switch of a vehicle and stores, on the occurrence of an abnormal state, a diagnosis code corresponding to the abnormality and the cumulative total value of the power supply periods at an occurrence time of the abnormality (see, e.g., Patent Literature 1).
The technique described in Patent Literature 1 also provides a technical idea which counts up the number of times the ignition switch of a vehicle is operated and stores, on the occurrence of an abnormal state, a diagnosis code corresponding to the abnormality and the cumulative total value of the counted numbers of operations at that time.
However, during the period, e.g., from the component assembly of a vehicle to the actual use of the vehicle, it is difficult to know the time when an abnormal state occurred in the vehicle using an electronic control unit. For example, when a method which adds up the power supply periods using the technique described in Patent Literature 1 is used, a timer function which requires a firm power source is needed and a timer needs to be activated.
Even in the case of using, e.g., a method which adds up the counted numbers of operations performed on the ignition switch, when, e.g., abnormalities corresponding to multiple abnormality codes have occurred in response to one operation of turning on or turning off the ignition switch, it is difficult to know the order of occurrence of the abnormalities. That is, when abnormalities corresponding to two types of diagnosis codes A and B occur, the order of occurrence of the abnormalities may be important in such a case where the occurrence of abnormalities in the order of A and B is normal, while the occurrence of abnormalities in the order of B and A is abnormal.